import './index.scss';
import userIcon from '@/assets/images/user.png';
import { useState } from 'react';
import { View, Image } from '@tarojs/components';
import ComponentLogin from '@/components/business/Login';

export default function Index() {
  const [isLoginShow, setShow] = useState<boolean>(false);
  const onLogin = () => {
    setShow(true);
  };
  const onClose = () => {
    setShow(false);
  };

  return (
    <View>
      {/* 登录 */}
      <View className="login-btn" onClick={onLogin}>
        <Image className="login-icon" src={userIcon}></Image>
      </View>

      {/* 登录组件 */}
      <ComponentLogin show={isLoginShow} handleShow={onClose} />
    </View>
  );
}
